<?php
echo '<p>' . $this->data->seminar['name'] . ' <span class="dateTime">' . format::dateAndTime($this->data->seminar['begin_date'], $this->data->seminar['begin_time']) . ' - ' .
                format::dateAndTime($this->data->seminar['end_date'], $this->data->seminar['end_time']) . '</span></p>';

if (count($this->data->selectedProgramList) == 0) {
    echo '<p class="description">' . text::getEscaped('registrationWizard.chooseProgramInfo') . '</p>';
}
echo '<ul class="commandList">' .
    '<li class="addLi"><a href="#" onclick="openAddBatchFormDialog(); return false;" />' . text::get('registrationWizard.addProgram') . '</a></li>' .
    '</ul>';

if (count($this->data->selectedProgramList) > 0) {
    echo '<h3>' . text::getEscaped('registration.selectedPrograms') . '</h3>';
    if ($programsOverlap) {
        echo '<p class="warningNote">' . text::getEscaped('registrationWizard.programsOverlap') . '</p>';
    }
    registrationHelper::printSelectedProgramList($this->data->selectedProgramList, true);
}
?>

<div id="dialogDiv" class="hidden"></div>

<script type="text/javascript">
function openAddBatchFormDialog() {
    var url = '<?php echo url::site('/user/registrationWizard/addProgramForm'); ?>';
    Yosemin.Popup.open(url, null);
    /*
    jQuery.get(url, function(data) {
        $('#dialogDiv').html(data).dialog({
            title: '<?php echo javascript::escape(text::get('registrationWizard.addProgram')) ?>',
            modal: true,
            width: 600,
            height: 'auto'
        });
    });
    */
}

function confirmRemoval() {
    return window.confirm('<?php echo javascript::escape(text::get('registrationWizard.removeProgram-confirm')) ?>');
}
</script>